package validation;


import dbmanager.DBManager;

public class Ismandatory implements Validation
{

	public String getMessage()
	{
		return " is a Mandatory field";
	}

	public void setDbmanager(DBManager database) 
	{
		
	}

	public boolean validate(String Value) 
	{
		if(Value.equals("no$") || Value.length()==0)
		{	
	    	 return false;
		}
			
		else
			return true;
	}

	public boolean validate(String Value, String ConditionValue) 
	{
		
		if(Value.equals("no$") || Value.length()==0)
			return false;
		else
			return true;
	}

	public boolean validate(String Value, String ConditionValue, String Refvalue) 
	{
	
		if(ConditionValue.equalsIgnoreCase("true"))
			return validate(Value);
		else if(ConditionValue.equalsIgnoreCase("false"))
			return true;
		else
			return false;
	}

	public void setBasicvalue(String value) {
		// TODO Auto-generated method stub
		
	}
}
